<?php
/*************************************************

分类模型 - the 
Author: WangHuabin <17-6-13>

*************************************************/
namespace Home\Model;
use Think\Model\RelationModel;
class CategoryModel extends RelationModel {
   

    //查询单数据
    public function get_one($map){
        $data = $this->where($map)->find();
        return $data;
    }


    public function get_all($where,$field='*',$page=1,$pagenum=9999999){
         $res = $this->where($where)->limit(($page-1)*$pagenum,$pagenum)->field($field)->select();
         return $res;
    }
    
}